package com.t371.spring.entity;

public class Baby {

    public Baby(Woman mother,String gender){
        this.mother=mother;
        this.gender=gender;
    }
    private String name;
    private Woman mother;
    private String gender;
    public String getName(){
        return name;
    }
    public Woman getMother(){
        return mother;
    }
    public String getGender(){
        return gender;
    }
    public void setName(String name){this.name=name;}
    public void introduce(){
        System.out.println("我是一个"+getGender()+"的宝宝，我的mm名字叫"+this.getMother().getName());
        if (name==null){
            System.out.println("我还没有名字哦");
        }else {
            System.out.println("我的名字叫"+this.getName());
        }
    }


}
